package com.example.express.bean;

import java.sql.Timestamp;
import java.util.Objects;

public class Courier {
    //主键
    private int id;
    //姓名
    private String name;
    private String phoneNumber;
    private String idNumber;
    private String password;
    private int sendNumber;
    private Timestamp registTime;
    private Timestamp loginTime;

    public Courier() {
    }

    public Courier(int id, String name, String phoneNumber, String idNumber, String password, int sendNumber, Timestamp registTime, Timestamp loginTime) {
        this.id = id;
        this.name = name;
        this.phoneNumber = phoneNumber;
        this.idNumber = idNumber;
        this.password = password;
        this.sendNumber = sendNumber;
        this.registTime = registTime;
        this.loginTime = loginTime;
    }

    public Courier(String name, String phoneNumber, String idNumber, String password) {
        this.name = name;
        this.phoneNumber = phoneNumber;
        this.idNumber = idNumber;
        this.password = password;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getSendNumber() {
        return sendNumber;
    }

    public void setSendNumber(int sendNumber) {
        this.sendNumber = sendNumber;
    }

    public Timestamp getRegistTime() {
        return registTime;
    }

    public void setRegistTime(Timestamp registTime) {
        this.registTime = registTime;
    }

    public Timestamp getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Timestamp loginTime) {
        this.loginTime = loginTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Courier courier = (Courier) o;
        return id == courier.id && sendNumber == courier.sendNumber && Objects.equals(name, courier.name) && Objects.equals(phoneNumber, courier.phoneNumber) && Objects.equals(idNumber, courier.idNumber) && Objects.equals(password, courier.password) && Objects.equals(registTime, courier.registTime) && Objects.equals(loginTime, courier.loginTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, phoneNumber, idNumber, password, sendNumber, registTime, loginTime);
    }

    @Override
    public String toString() {
        return "Courier{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", phoneNumber='" + phoneNumber + '\'' +
                ", idNumber='" + idNumber + '\'' +
                ", password='" + password + '\'' +
                ", sendNumber=" + sendNumber +
                ", registTime=" + registTime +
                ", loginTime=" + loginTime +
                '}';
    }
}
